package jp.co.showbiz.admin.talent.imp;

import java.io.File;
import java.io.Serializable;
import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;

import jp.co.showbiz.common.base.BaseBean;
import jp.co.showbiz.common.entity.FileBean;

public class TalentDto extends BaseBean implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6515072938791915556L;
	
	// DataBase Column
	private String talent_id;
	private String talent_kana;
	private String talent_eng;
	private String tanjoubi_date;
	private int bunya_id;
	private String debyuhi_date;
	private String sinchou;
	private String katudou_naiyou;
	private String jyushou_naiyou;
	private String upd_date;
	private String shoukai_naiyou;
	private String group_id;
	private String member_id;
	private String bunya_name;
//	private String comment;
	private String kanaKey;
	private int bunyaKey;
	private String thimb_vga_filename;
	private String thimb_qvga_filename;
	private String startNum;
	private String endNum;
	private FileBean thumb_vga;
	private FileBean thumb_qvga;
	private HashMap<String, Integer> pageMap;
	private int content_id;
	private String kubun;
	
	
	
	// Content
	private String contentId;
	private String contentKubun;
	private String title;
	private String fileName;
	private String filePath;
	private int fileSize;
	private String comment;
	private String updDate;
	private String service_location_kubun;
	private File vgaFile;
	private File qvgaFile;
	private String vgaFileFileName;
	private String qvgaFileFileName;
	private String talentId;
	
	// Info Page
	private String fileFullPath;
	private List<HashMap<String, Object>> listTalent;
	private List<HashMap<String, Object>> listTalentGroup;
	
	
	public String getKubun() {
		return kubun;
	}
	public void setKubun(String kubun) {
		this.kubun = kubun;
	}
	public int getContent_id() {
		return content_id;
	}
	public void setContent_id(int content_id) {
		this.content_id = content_id;
	}
	public String getTalent_id() {
		return talent_id;
	}
	public void setTalent_id(String talent_id) {
		this.talent_id = talent_id;
	}
	public String getTalent_kana() {
		return talent_kana;
	}
	public void setTalent_kana(String talent_kana) {
		this.talent_kana = talent_kana;
	}
	public String getTalent_eng() {
		return talent_eng;
	}
	public void setTalent_eng(String talent_eng) {
		this.talent_eng = talent_eng;
	}	
	
	public String getThimb_vga_filename() {
		return thimb_vga_filename;
	}
	public void setThimb_vga_filename(String thimb_vga_filename) {
		this.thimb_vga_filename = thimb_vga_filename;
	}
	public String getThimb_qvga_filename() {
		return thimb_qvga_filename;
	}
	public void setThimb_qvga_filename(String thimb_qvga_filename) {
		this.thimb_qvga_filename = thimb_qvga_filename;
	}
	
	public String getService_location_kubun() {
		return service_location_kubun;
	}
	public void setService_location_kubun(String service_location_kubun) {
		this.service_location_kubun = service_location_kubun;
	}
	public String getTanjoubi_date() {
		return tanjoubi_date;
	}
	public void setTanjoubi_date(String tanjoubi_date) {
		this.tanjoubi_date = tanjoubi_date;
	}
	
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	public int getBunya_id() {
		return bunya_id;
	}
	public void setBunya_id(int bunya_id) {
		this.bunya_id = bunya_id;
	}
	public String getDebyuhi_date() {	
		return debyuhi_date;
	}
	public void setDebyuhi_date(String debyuhi_date) {
		this.debyuhi_date = debyuhi_date;
	}
	public String getSinchou() {
		return sinchou;
	}
	public void setSinchou(String sinchou) {
		this.sinchou = sinchou;
	}
	public String getKatudou_naiyou() {
		return katudou_naiyou;
	}
	public void setKatudou_naiyou(String katudou_naiyou) {
		this.katudou_naiyou = katudou_naiyou;
	}
	public String getJyushou_naiyou() {
		return jyushou_naiyou;
	}
	public void setJyushou_naiyou(String jyushou_naiyou) {
		this.jyushou_naiyou = jyushou_naiyou;
	}
	public String getUpd_date() {
		return upd_date;
	}
	public void setUpd_date(String upd_date) {
		this.upd_date = upd_date;
	}
	public String getShoukai_naiyou() {
		return shoukai_naiyou;
	}
	public void setShoukai_naiyou(String shoukai_naiyou) {
		this.shoukai_naiyou = shoukai_naiyou;
	}
	public String getGroup_id() {
		return group_id;
	}
	public void setGroup_id(String group_id) {
		this.group_id = group_id;
	}
	public String getMember_id() {
		return member_id;
	}
	public void setMember_id(String member_id) {
		this.member_id = member_id;
	}
	public String getBunya_name() {
		return bunya_name;
	}
	public void setBunya_name(String bunya_name) {
		this.bunya_name = bunya_name;
	}
	public String getKanaKey() {
		return kanaKey;
	}
	public void setKanaKey(String kanaKey) {
		this.kanaKey = kanaKey;
	}
	public int getBunyaKey() {
		return bunyaKey;
	}
	public void setBunyaKey(int bunyaKey) {
		this.bunyaKey = bunyaKey;
	}
	
	public String getStartNum() {
		return startNum;
	}
	public void setStartNum(String startNum) {
		this.startNum = startNum;
	}
	
	public String getEndNum() {
		return endNum;
	}
	public void setEndNum(String endNum) {
		this.endNum = endNum;
	}
	public HashMap<String, Integer> getPageMap() {
		return pageMap;
	}
	public void setPageMap(HashMap<String, Integer> pageMap) {
		this.pageMap = pageMap;
	}
	public FileBean getThumb_vga() {
		return thumb_vga;
	}
	public void setThumb_vga(FileBean thumb_vga) {
		this.thumb_vga = thumb_vga;
	}
	public FileBean getThumb_qvga() {
		return thumb_qvga;
	}
	public void setThumb_qvga(FileBean thumb_qvga) {
		this.thumb_qvga = thumb_qvga;
	}
	public String getContentId() {
		return contentId;
	}
	public void setContentId(String contentId) {
		this.contentId = contentId;
	}
	public String getContentKubun() {
		return contentKubun;
	}
	public void setContentKubun(String contentKubun) {
		this.contentKubun = contentKubun;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public String getFilePath() {
		return filePath;
	}
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}
	public int getFileSize() {
		return fileSize;
	}
	public void setFileSize(int fileSize) {
		this.fileSize = fileSize;
	}
	public String getUpdDate() {
		return updDate;
	}
	public void setUpdDate(String updDate) {
		this.updDate = updDate;
	}
	public File getVgaFile() {
		return vgaFile;
	}
	public void setVgaFile(File vgaFile) {
		this.vgaFile = vgaFile;
	}
	public File getQvgaFile() {
		return qvgaFile;
	}
	public void setQvgaFile(File qvgaFile) {
		this.qvgaFile = qvgaFile;
	}
	public String getVgaFileFileName() {
		return vgaFileFileName;
	}
	public void setVgaFileFileName(String vgaFileFileName) {
		this.vgaFileFileName = vgaFileFileName;
	}
	public String getQvgaFileFileName() {
		return qvgaFileFileName;
	}
	public void setQvgaFileFileName(String qvgaFileFileName) {
		this.qvgaFileFileName = qvgaFileFileName;
	}
	public String getTalentId() {
		return talentId;
	}
	public void setTalentId(String talentId) {
		this.talentId = talentId;
	}
	public String getFileFullPath() {
		return fileFullPath;
	}
	public void setFileFullPath(String fileFullPath) {
		this.fileFullPath = fileFullPath;
	}
	public List<HashMap<String, Object>> getListTalent() {
		return listTalent;
	}
	public void setListTalent(List<HashMap<String, Object>> listTalent) {
		this.listTalent = listTalent;
	}
	public List<HashMap<String, Object>> getListTalentGroup() {
		return listTalentGroup;
	}
	public void setListTalentGroup(List<HashMap<String, Object>> listTalentGroup) {
		this.listTalentGroup = listTalentGroup;
	}
	
	
	
	///////////////////////////////////////////////////////////////////////////
	public void setMaxTalentId(HashMap<String, Object> maxTalentId) {
		if(maxTalentId == null) {
			return;
		}
		talentId = dataSet(maxTalentId.get("talentId"));
	}
	
	public void setMaxContentId(HashMap<String, Object> maxContentId) {
		if(maxContentId == null) {
			return;
		}
 		contentId = dataSet(maxContentId.get("contentId"));
	}

	public void getTalentContent(HashMap<String, Object> talentImg) {
		if(talentImg == null) {
			return;
		}
		filePath = dataSet(talentImg.get("filePath"));
		comment = dataSet(talentImg.get("comment"));
		fileName = dataSet(talentImg.get("fileName"));
		vgaFileFileName = dataSet(talentImg.get("vgaFileFileName"));
		qvgaFileFileName = dataSet(talentImg.get("qvgaFileFileName"));
		fileFullPath = filePath + vgaFileFileName;
	}	
	
	private String dataSet(Object obj) {
		SimpleDateFormat sdf = new SimpleDateFormat();
		sdf.applyPattern("yyyy/MM/dd");
		if(obj == null) {
			return "";
		}
		if(obj instanceof String) {
			return (String) obj;
		}
		if(obj instanceof Date) {
			return sdf.format(obj);
		}
		if(obj instanceof Integer) {
			return String.valueOf(obj);
		}
		return ""; 
	}
}
